Fixed segmap bug