Bug fix to deleting blocks