fixed problem with overlapping