Fix typing for key