various fixes to address GCC warnings