Fix bad access to getScanKey.