Fix API query