proposed fix for BitBucket Issue #157