fixed database unittests