Fixed erroneous query change callback values and fixed queries after reconnect