When you have upgrading buildings, and you click using the arrows on the screen to go to the next one. It always works correctly, except when the next one is upgrading. Then the window just closes (which is annoying if you just want to upgrade all the same buildings)
So, when you have 5 wells, you can click from one to another. Once you’re upgrading one of these, you can click until you reached the one that is in the upgrade phase, and the window closes.