fix a bunch of compiler warnings