Fix failure of tests
Merge pull request #896 from lvotypko/fix-tests