Various fixes

A couple of fixes to reduce error output.