Fixed database adapter

Fixed db adapter