Fixed a number of compiler warnings.