Revert of 925517489041b39b2d22ea3ce2e5a7661d4f4c26 (bug was introduced with it)