Fixes a problem in finding objects by custom criteria