Moving terminal to the document