Fixed bug in the computation of the number of blocks
Fixed unused parameter warnings