Moved cleanupMaps in the task timeout to within the callback for stopTask