fixes treatment of type parameters in types