Almost finish single server query, but there is bug