fixed the misusage block.getBlockNum()