Bug789 v1.7 part2

First patch is fixing lua build.