Have you tried changing the values a bit?It might be that the servos center value is different from the one you have in your code resulting in the servo still rotating... How fast does the servo still rotate with that code? Full speed? Half speed?