Fixed some build issues, including a compiler warning