The problem sounds like changing hardware vs. fixed software. The software is expected 4 pulses while the hardware is generating 5 pulses: for example, you have changed your encoder (from a 400-ppr encoder to a 500-ppr encoder, for example) but not able to rewrite the software.