fix error in getBlock