corrected object in conditional

Reviewing the code operation and noticed this error in the if...else conditional.  Since element is null, and the value of element is based on the result of the if...else for elementFrame, this is just a simple typo that likely has been overlooked.