Fixing errors related to type parsing in complex search