fix some build settings and warnings