Added support for selected shapes