Fix draggable boundary code