database problems fixed