fix the error on computing sub cube size.