Fix up issues related to move to active_record 3.