some improvements in terminal component