fix local offset calculation