Changed the handling of blocks in handleDrag