fix time filtering