Fixed incorrect attribute offset calculation.