Added support for compound shapes.