Fix zero-indexing