JS bug fixed