Bugfixes for EC serialization and plotting