Fix raw writes