Fixed issues with key handling not detected in previous tests