terminal: don't use deprecated API