Fix bug that performed several duplicated calls to base URL through AJAX.

It happened when required URL was undefined.