Fixed silly error on filter, added tests to catch this