Fixed javascript errors.