Fix database upgrade crash (Fiends & profile) Fixes #82.
Merge pull request #83 from ratan12/working

Fix database upgrade crash (Fiends & profile) Fixes #82.
Merge remote-tracking branch 'upstream/working' into working