Two small changes:
- swapping the two parameters of the task_create_ex
- correcting a bug in the mode manager: it now waits for the highest end of period
One little error solved in ptask.c