Revert "apply uselessgap patch"

This reverts part of commit 95e0afec35c8c1ebe29731bb7b3fe4499ea8fb54.