Added support to change number of running instances of a runnable.