solves api query bug