fix: discharge end bug