fix last few bugs preventing gcc from working