Fix warnings

Several fixes to address the warnings from different compilers that people have reported with the new release.