fix inheritance of class variables