Revert "Previous fix broke things worse"

This reverts commit 01780c6ddb1b99bb6c4ccc492e4dcefd186594bf.