Added the fixes from PathScale