fixed merge by position bug
fixed sample position bug