Added support for ellipses and rectangles