fix model inheritance