Fixed bugs related to gender handling