Fixing query in GetCommand server.