Minor bug fixes. Still has bug with structs_by_ref test case.