fixed bug in overlap