Minor fixes on loader