fixed issues on socket session