Fixed minor JS bug