bugfixes in DB