Fix some tests failures
Merge pull request #285 from mitya57/master

Fix some tests failures