Make soft button’s rounding method more robust. Fixes #1