Fixed segfault on modifier events.