fix config ending bug