fixed some javascript synatax errors