fixing bug when calculating loader