Fix JavaScript error.