Fixed bugs turned up by compiler settings.