bug fixing on upgrade phontom