fix bug in BeforeBedShift when start time is after midnight