Fixed some lua 5.2 incompatibilities
Merge branch '0.2.8'