Bugfix in loader, insert last batch