Fix minor problems found by static checking.