Fix some situations where objects were being accessed before they were constructed.