Fixed bug in overlap