fix Lua issues: keep-alive fix and update sqlite