fix user update logic