@FXML
	private void saveGame(ActionEvent event) {
		if (HockmanMain.game != null) {		
			if(currGameFile == null) {
				if(!needsFileChooserWorkaround()) {				
					FileChooser fileChooser = new FileChooser();
					fileChooser.setInitialDirectory(new File("."));
					fileChooser.getExtensionFilters().add(new ExtensionFilter("Game XML files (*.gam)", "*.gam"));
					currGameFile = fileChooser.showSaveDialog(null);
				} else {
					// TODO remove workaround for JavaFX bug: FileChooser not running under 64 bit Windows
					// see http://www.javaworld.com/javaworld/jw-05-2012/120529-jtip-deploying-javafx.html?page=3
				   class FileNameFilter extends FileFilter {
				      public boolean accept(File arg0) {
				         if(arg0.isDirectory()) return true;
				         if(arg0.getName().endsWith("gam")) return true;
				         return false;
				      }
				      public String getDescription() {
				         return "GAM files (*.gam)";
				      }
				   }		
				   JFileChooser chooser = new JFileChooser(".");
				   FileNameFilter filter = new FileNameFilter();
				   chooser.setFileFilter(filter);
				   int returnVal = chooser.showSaveDialog(null);
				   currGameFile = null;
				   if(returnVal == JFileChooser.APPROVE_OPTION) {
					   currGameFile=chooser.getSelectedFile();
				   }
				}
			    if(currGameFile == null) {
				   return;
			    }
				
				if(!currGameFile.getName().contains(".")) {
					// workaround JavaFX bug about not adding file extensions					
					currGameFile = new File(currGameFile.getAbsolutePath() + ".gam");
				}
			}
			GameCreator.instance().setCurrFileName(currGameFile.getAbsolutePath());
			GameCreator.instance().saveGam(HockmanMain.game);
			HockmanMain.modified = false;			
		}
	}