fix serialization of views