some fixes in phases