Fix crash with RSM