Fix warnings and errors on git master