Fix. ffi binding does not update counter for Lua 5.1