Fix for type_id issue