fixed a bunch of compiler warnings