fixed one small mistake with subsetting of variable