[terminal] few fixes (fixed #381)