fix rekeying process