bug fix: wrong key length