Locking bug fixed