Fix metaclass creation