Moved ajax to after we succeeds the first call to not delay the showing of the page.