Fixed crash

The program no longer crashes when time frame is exceeded.