more fixes for lua 5.2