fix a bug in detach element of Multi. Return event in interval function to allow to stop the thread