Lock handling improved.