issue #2870: fix lua and js warnings and errors