Fix two coverity issues