Fix compilation errors in entity loaders