o fix broken offset calculation.