Fixed locks issue