Added os x compatibility with copying