fixed js errors

I think js errors are fixed!