Undefined indexes sname and fname fixed