prevent against emitting done event twice