fixes for testthat