Made some fixes to the js errors.