EDIT: SOLVED
I designed a bi-directional synchronous counter with the sequence 7 4 6 5 2 1. The up count counts correctly (ie 7 4 6 5 2 1) but when I flick the switch to reverse it it counts backwards correctly initially until it reaches 5, and then it goes back to 2 and then back to 5 and...