fix bad resolved merge: remove dupplicated code