Changed to using an interface event listener for handling when loading finishes.