Fixed bug with miscalculating region width.