fixed about 100 warnings