A bit awkward, but better fix for #22