Fix gain set causing empty names and name set erroneous gain