Fixed time calculation mistakes