removed strange ends of lines