Fixed inheritance bug