fix time-based limit logic