Implemented clone based on Anssi's suggestion.

Doesn't seem to be needed now, but better be safe than sorry.