Did your design include a pushbutton to reset the counter to a valid state? I'd guess you have come down a path beaten hard by those with great expectations and no valid state....it didn't work as expected.
That was the quick fix. I'll wait for the OP to see if a more elegant solution is required.Did your design include a pushbutton to reset the counter to a valid state?
I suspect that that is very much the case -- I know that I have been known to throw things like that at students.It could be that the instructor is teaching a lesson about using don't cares.
I simulated the design using 4 flip flops and because the valid states don't include 0 it didn't work as expected.