error handling changes that ended up on wrong branch