Revert "Remove upper bound and fix #103"

This reverts commit a45a6d9541910c6ecd1acfc60ddae7033886e8f9.