Changed shallow copy to deep copy of menuItems