fixed terminal error