Loading callback is now called only once at the correct time.