Fix inheritance bug