Fix race condition when using Loader at high frame rate