Revert #80

This commit was reverted because it caused bug #83.