Some more fixes and changes for keys