Fixed bug in type filter