bugfixes for 385,260
Merge pull request #601 from GiorgiyLutidze/bugfixing

bugfixes for 385,260