* first part of changes to make batch operation work correctly