Fixed file-end issue on parsing comments