little query bug fixed