made some fixes to filter code