Ubuntu fixes

As discovered by Patrick