fix for a case when pat-<pattern> is not the first class