Fix bug that leads to an infinite loop on prm free
Dictionary: Switch to PRM instead of internal