Morphological stability of nanostructures