fix exception in QuerySocketHandler