fixed some of the warnings about deprecated use of Selection.Elements collection