commit before locks