patched regression in getPhases query