fixed js problems