fixed bug to exit out when not enough time has elapsed