fixed inherit function as per #162