Updated loader onLoad callback