fix type parsing