Attempt to make loading wait until API is loaded