trying to resolve loader loop error