Fix rotation.js to suit how rules are really intended