dealing with url problem in AJAX call