I'm not sure why this is happening, there must have been an error when exporting the game to the browser, but I'm sure that this error doesn't exist in the executable game.