fixed race conditions, updated to client prefs