Fixes to event order + crash fix