database fixes, small things