Warning fixes (from Andrea Pessino)