Fixing some minor diffs between old and new versions
Use 0-based indexing