fixed metaclass bug