Additional fixes to gc, working on tests