Fixing bug in type search.