Bug fix: calculate overlapping correctly
Merge pull request #626 from cfscosta/master

Bug fix: calculate overlapping correctly