Fix for Issue #40

Change the way variable 'bound' is calculated (details in Issue #40)