fixed "atoi not declared" issue,
fixed the issue at not clearing by mode change