Fixed bug, that wrong number of blocks was checked.
Thanks to user 'oh-la-la'.