fig close bug fixes and pref loca bug