fixed some javascript stuff