Fix copy mode when the buffer size is smaller than 2000