fix loading spinner which was spinning forever

this should fix it
Merge pull request #229 from huaruiwu/patch-2

fix loading spinner which was spinning forever