Some fixes to eliminate compiler warnings