Fixes bug 1267526, API fixed
Merge pull request #79 from ikhudoshyn/bug/1267526

Fixes bug 1267526, API fixed
Merge pull request #80 from zaletniy/master

Updated test for bug/1267526