fix query bug; query only for NUM_SAMPLED_STORIES * SAMPLE_MOD in inner query so that we can increase SAMPLE_MOD