Fixed sorting issue in Chrome and drag events in Firefox