bug fix with date filter not working properly