fixes to two fatal errors found in democat's error.log -Tyler