Fixed bug caused CSV serialization to fail