Fix writeObject. 28/28 tests pass!