Change key assignement to avoid already assigned key