fix #140, add copyAttributes param
very minor