fix pm crash