fixes some errors with JS backtraces