The many definitions of "ubi"
"Ubi" does not always mean "when"! Here is a list of all of its other meanings with all of the words that also mean the same thing! 1. where: ubi, quo, qua, utro, quatenus, quatinus 2. wherein: quo, ubi 3. whereby: qua, qui, ubi 4. in what place: ubi 5. whereas: quod, ubi, quoniam 6. when: cum, quando, ubi, et, quum, postquam 7. wherein: ubi 8. as soon as: ut, cum primum, simul atque, ubi, uti
There is a very handy table at https://en.wiktionary.org/wiki/Appendix:Latin_correlatives