Fix NPE with Shake events