Some fixes for keys