fixed a event empty and dragging bugs