fix terminal inheritance