database fixes