fixed a couple of bugs with restarting the task in a new mode, pydaq stuff mostly