Lock fixes