Porting in improvements from Ubuntu