Trying to fix write issues