Fix admin ajax handling of API var