filter not working as expected