revert more of r9529
better fix for issue 2729