bugfix for key renewal