fixed lots of compiler warnings