fix: infinit emitting if ioc = 1
min refactor