remove useless locks