Fix query for socketio