Fixed crash on building in console
Merge pull request #56 from waynezhang/master

Fixed crash on building in console