What?! I've never experienced this bug before? Maybe you somehow managed to crash the game? Or maybe it's the click and drag feature which was the issue?
The game was still running and I could still click button and such so I doubt it crashed, but it's totally possibly that it's because something from the click and drag part, I did distinctly remember clicking somewhere on the background instead of the upgrade when it happened. Sorry I can't give a more detailed bug report on what happened since... it just happened so suddenly even I'm confused XD.
hope it get fixed soon as well as the upgrade not being saved :)