added counter reset if the position value gets too high.

Signed-off-by: Seb Lee-Delisle <sebleedelisle@gmail.com>