Fixed wrong emscripten behaviour