When you use the phrase “provided that” remember that what follows qualifies what goes before it.  It is not read as a separate provision in its own right.