Working locks add

add working lock and fixed some errors