Fixed model inheritance bug.