Fixed race condition bug with asset loader