Fix bug in `onUpgrade()`
Merge pull request #241 from codeguru42/fix-onUpgrade

Fix bug in `onUpgrade()`