Fix warnings

- Apply a patch from Francisco