Revert previous commit

Revert commit 26e77f93f0b6cc1218d84d0b3c350a11ab01a791
This logic is obviously wrong. Investigate more tomorrow.