fix subclass and idkey bugs