fix crash when block deletes itself