优化代码，修复each逻辑BUG

Signed-off-by: gaubee <gaubeebangeel@gmail.com>