Updated the globals to contain 1-based indices instead of 0-based (for DB compatability).