corrected bug

corrected : a wrong type for previousMs created some erroneous cases of
looping too fast if PULL_DELAY > 32k