Also fix clone method when no document supplied. Change-Id: I7b24e8622049c6293fa0ef813696d5d91a901e75