Fix ajax calls to request json data