Some js fixes