protect against 'end of the day...' error