database adapter fixes