Reenabled DB-check (and bugfixes)