Some fixes for warning messages