Fix object reference error.
More selectively filter errors to log.