Add checks for ghost phase2 and no need to check for number of phase2 here
Oops remove variable with same name unused!