fixed some javascript.