random database fixes