Fixed a bug which caused loading to block under special circumstances