Fix using power of regionSize where actual regionSize value should be used.

Signed-off-by: Ross Allan <rallanpcl@gmail.com>