NPE on Palette update
While loop

Conditional jump to the first statement. The while block is not yet attached to the surrounding statements.