fixed failing test
issue #174: fixed key validation