self.current_task_number is an index.  I added some code to avoid going lower than 0, but the -1 makes sense in the index case.