Fixed a bug with overlap