Misc fixes to addObject