Fix ObjectModel bugs.