Make xml serializable. Not happy though.