change target to 10.8, and fix some semantic warnings