Adds flag for #283.

I've also fixed the serialization problem which was raised in issue #279 and subsequently pull request #327. I figured this out whilst closing #283.