fix keyerror bug for age and gender