reporoduced #539 with test
(*) CTL-539 Fixed
Merge pull request #35 from IvanKupriyanov/develop

Bugfix for https://catelproject.atlassian.net/browse/CTL-539