fix assign by reference inheritence issues