Remove random chars at the end of line