Fixed a couple of warnings and an error.