Attempt to fix JS bug