Fetch correct key; fixes #1; provide tests