Yes, you are right. Move it out of the conditional block.