Cactus bug + some rewritings in blocks.py.