Added disposal of unused locks