Merge pull request #778 from Arantor/release-2.1

Some database fixes
Merge pull request #780 from Arantor/release-2.1

! Stupid rookie mistake of mine.