fix wrong comparison
Merge pull request #4896 from BevapDin/fix-unloading

fix wrong comparison