fix a bug of notify delegate that is arriving end index.