fix several special cases of