fixed 'loader' undefined issue