Fix coverity

Fix up two issues that cropped up in a Coverity scan.