fixed bug that occurs if user does not specify a time and leads to infinite loop.