Revert "Bug fix attempt". This didn't work out the way I planned.

This reverts commit 4f55f4a976acaeccbe810a81fdd557787cf7f6db.