Fix free event bug