Fixed so class metadata is cached when the class is defined.
fixed mixins