A couple small fixes suggested by @distler