fix some problem with apiQuery