Fixed a inheritance bug.