fixing some bugs in frontend and sockets binding