Fixed common JS bug