fixed bug in type filtering