Fix bug at end of line