Retain user preferences by assigning them to the return object from the modal window object itself rather than its scope.