The magistrate undresses, hangs his clothes on a tree, and goes to sleep in the miller's bed. The miller has escaped from prison and sees the magistrate in his bed. The miller thinks that the magistrate is sleeping with his wife and plans to switch clothes with the magistrate and avenge himself by seducing the magistrate's wife. The miller leaves, dressed as the magistrate, and the magistrate soon wakes up. He goes outside and sees that his clothes are gone, so he dresses in the miller's clothes.