Fixes for R CMD check.
(From Hadley)