fixed bug MAGE-6808 github issue #35