fixed a bug of loader
Merge pull request #1741 from ShengxiangChen/loaderbug

fixed a bug of loader