Fixed serialization not working properly due calling toString after calling
toJson