Fixed hang on write