Added support for $BLOCK_INSTANCE  and better rounding