Fixed some bugs when structure spreadsheet is parsed