fix invalid types for classes