scheduler: fix the phase insert duplicities