Just recieved a responce via another forum.
I ran in the same problem. I fixed it by replacing the line:
myservo.write(SERVO_MAX + (SERVO_MIN-SERVO_MAX)/100 * val); // sets the servo position 0-180
by the following 2 lines of code:
val = map(val, 0, 100, 0, 180); // scale 0%-100% between 0 and 180)
myservo.write(val); // sets the servo position 0-180