Added uniquify for buffer switching