Fix a bunch of GCC errors