make entity PI work in all modes