fixed NPE (in create new sample attribute)