Changed block-recognition-algorithm