EMP\Issue #164 fixed. Tests added.
Merge pull request #203 from nazariitashak/master

Issue #164 fixed.