fixed inheritance bug