Fixed main process