Important bugfix (locking)