fixing invalid variable