Fix to rotation code to have array indices run fully down to zero when counting down. Thanks to Michal Becak for spotting this.