This just didn't need doing every time, as it is part of the setup (IMHO), so I moved it inside the 'if' block.