fix linker warning and a small bit of uninitialised memory

Two small fixes that were found when compiling an old project with emscripten