Fix ipc cast issue