fix for #573
Merge pull request #579 from nelenkov/dev

fix for #573