Fix issues in the console application
Merge pull request #15 from Randy-Ma/master

Fix issues in the console application