Fix bug where irrelevant key mapping is set