Fix bug with setquery checking and add some initial websockets tests