fixed most warnings