Made change in $TERM dependent on existing TERM