Added resetTask functionality for contracts.