while writing docu, found an old bug in remdevice
had an error in the endtask routine