fix exception when creating compoent class of type X-anything