fix date range errors