fix tests for keys
Merge pull request #761 from my-personal-forks/fix-tests

fix tests for keys