Fixed #21 - Change some copy calls with deepcopy.