Fixed up a few bugs dealing with instance variables.