Fixed an error in client side API query