minor changes to the way it handles the key casing