fix some bugs when remove problems and when error in command lines