Fix crash in rule paste