fixed some javascript things