fixes to loader class