Some fixes in algorithms implementations.
[JPPF] Limit tasks in one job.