Minor bugfixes and task run optimisations.
Minor bugfixes and task run optimisations.