Fix event ordering in sidebar