Fixing MyObject class inherit