Change XMLHttpRequest call ordering to satisfy firefox.