Bug fix: putting the key where it belongs