Fixes potential timer wrap detection