Fix a bug of "run-button not functional when there were any errors."
refine code
remove extra blanks
Merge pull request #208 from wangqiang1208/bugfixing/code-run-button

Fix a bug of "run-button not responding when there were any errors."