Bug789 v1.7 part2

First patch is fixing lua build. But PR is showing 325462d in an incorrect place.