fix buffer hash error
add forEach iteration