bug fix for loading