Bug fixes for new types_class