patch main process