Patch JS runtime issues