Fixing batch locking issue
Merge pull request #372 from einhverfr/1.3

Fixing batch locking issue