fixed #10. it auto resets when distances are too small