Fix for encoder calculation.