Fix inheritance bug.