key scan bug