fix key handler