Fix sidebar event bug