Fixed inherit function.