make sure it works with R < 3.1