fixed errors pulled from upstream