Improve serialisation of genders