change AJAX call to work in Safari