fixed most compiler warnings