fix callback on process exited