Fix up some key construction.