Fixes database connections.