fixed up build issues and warnings