fixed bug where filtering by codedType was returning all elements