fix narrow boundary error