Fix typo: key? versus key
Move the debug message higher.