Minor bug fixes in object scope.