Bugfix in phi