Corrected the condition in sortableBeforeStop