ajax call fix, select inside function.