Use Array.clone method instead of simply assignment