Databasefail3

Merged back into master.