fix boundary issue

fix boundary issue