fix merge error

duplicated code