fixed ipc with do-while
bugfix