Fix error with setting a null ParentClass