re-doing 19f3430, accidentally undone by 24b6f82