cleanup loader
Merge pull request #5023 from gero3/patch-26

cleanup loader fixes #4926