ACCESS: add code to replace the checks on KEYBUFCNT