#141 cleanup locking