fix deadlock in append