Fix crash on non-existing block