fixed some odd js issues