fix bug in merged