Fixed a couple of errors and warnings.