Merge patch for bug 2750. Thanks Sylvain!
Remove unused variable.