fixed loader
trying to fix index bug