fix crash with PMs