Trying to fix a weird javascript bug on deployment