fix keylog callback coredump