fix some of the warning/errors clang 3.1 reports