Fixes for serialization.