This reverts commit a60ea79a41. Reverting these changes since they broke things. Fixes #1608.
a60ea79a41