fix bugs for mad stop.
update to new version.
remove useless comments.