Added support for more element types.