Revert "Revert "whew, fixed!""

This reverts commit 0ca2bfd8e103bdef44d1afd3e17b5690a1f5d8c9.