Added event handlers for drag