fix --mirror flag not taken into account