Add timeout mechenism to clear dead flows from tree periodically
remove bugs