Svag matchende rim for reference electrode