Fix association bug when key has no machines