next bunch of fixes for bugs found by randconfig
8 files changed