fix inheritance precedence