A few error and warning patches