Fix some bugs with hardcoded settings, and do checks on multiple key associations.