Bug fix when overplotting