Finally fixed block deletion bug.
Removed duplicate code.