Fixes wait time calculcation
Merge branch 'wait_time_calc'