fix update logic in socket handler