database bugfix