fix some serialization bugs ceylon/ceylon-js#438