fixing database adapter