fix PhWindow compatibility with tests