added extra condition
Merge pull request #2887 from ilya-lavrenov:ipp_morph_fix