Fixing database adapter