Fixed some tests and other stuff in serialize.