solve green issue combined with EC and multi-packet input

same as #1179.
for master branch.