fixed bug when lock can't be taken after releasing