fixed issues with resources not being in order