various hot fixes for issues discovered while checking errors