i++ does a post increment, so you're passing the un-incremented value of i. So the increment is useless.  Did you mean to pass i+1?