Revert "Failure to fix bugs from previous commit"

This reverts commit 6eab57e4d770d9011787771aef34bde46e2dfccd.