Fix bug: if the end line is comments, the modifyVars option will have no effect

If the end line is comments, the modifyVars option will have no effect.