Corrected bug in palette rotation for a small triangle