fix to end times after midnight