partial revert of a5932a579ff941f48e1e59c0b8df0861ef7cb7c9