More warning fixes.
Lua Template Fix.
Merge pull request #3297 from dumganhar/develop

More warning fixes and Lua Template Fix.