Bug with key calculation

...is fixed