fix doubled lock