fix exception when attributes have only one value