Fix (some of the) issues uncovered by static analysis: https://dkonst.web.cern.ch/Garfieldpp_Oct9_2020/