remove unneeded fields from phase object
set the last phase correctly