Fix wrong writeBoolean location