Fix warnings and errors.