fix date filtering