fix error in dead-time insertion for values close to PWM_MAX_VALUE