Partial re-revert 7e1edb0