Fix bug in type_parse