fix error logging in lua key events