A bit of tidying along error paths.