fix parsing the last attribute