Fixing dangling javascript errors.