Fix gcc warnings

I like to build with -Wall -Werror , and these things were killing me.