fix bug in drag event