Fixed more writing errors