resolving conflicts on cherry-pick
Fixing conflicts from cherry-pickng
Merge pull request #81 from einhverfr/1.4_fixing_perm_update

Lock batch function