Fix bugs in objects