fix database adapter