Revert 882c538 & 8426ddc, which introduced regression