Fixes for Console, 1) wrong lambda capture, 2) Crashes when click 'next'
in ConsoleTest.
Merge pull request #6249 from dumganhar/develop

Fixes for Console, 1) wrong lambda capture, 2) Crashes when click 'next' in ConsoleTest.