Fix crash when invailded block