fixed a shallow copy bug