Apparatus is provided for application to a nerve of a subject, including an electrode cuff, which includes a housing, which is configured to be placed at least partially around the nerve so as to define an inner surface of the housing that faces the nerve. A plurality of insulating elements are coupled to the inner surface of the housing at respective insulating element longitudinal positions along the housing, such that the inner surface of the housing and pairs of the insulating elements define one or more respective cavities at respective cavity longitudinal positions along the housing. One or more electrodes are fixed to the housing in fewer than all of the cavities, such that at least one of the cavities is an empty cavity that does not have an electrode positioned therein. Other embodiments are also described.