Fixed deserialisation issues and logging