Removed the necessity to specify the index i in the task_create().
Now the index is returned by the task_create if the task has been
correctly created.