type safed getLabel, getIDx method and removed bug for to cases