fixed hash query bug