Static: code out of loop

That code didn't need to be in the loop.