Fix database upgrade crash (Fiends & profile) Fixes #82.