error with order of demeaning