Fix comments before EOF creating an infinite loop