Can you post your .capx file?
AJAX requests are asynchronous, meaning the game carries on running while the request happens in the background. When it completes, it triggers the 'on completed' event. If the server took 5 seconds to respond, 'on completed' might only trigger 5 seconds after the AJAX request. If the server had an error and didn't respond at all, 'on completed' will never trigger at all.