fix order of subset and factor fix commands