fix json ajax requests problems