Fix QuietHours crash