Fixed some Ubuntu compatibility issues