Fix end-point problem about issue #1