minor fixes
database bugfix, formatting