id.vars --> measure.vars in error check