New lock and some fixes