Fixed bug where comment on last line would lead to infinite loop.