fixes key assignment