fix update code in macosx gui