Fix NPE in clone