This version actually sets the keys correctly.