fixed with upstream/master changes