Fix some warnings and a Launchpad build break