bugfix: incorrect lock index