Porting changes for Ubuntu