minor change, should prevent some unnecessary looping on filter