Minor improvements to fix random setting changine task / activating tasks repeatedly.