Ok, moved it down inside the if clause.