Fixed #1, Fixed #2 Fixed calculation of keys