Fixed object close issue.

cbugg: close bug-406