Added conversion to int to prevent float on PWM