Fix warnings by patching

@tcies