fixed most warning.