remove spacebar at the end of line