Fix the indicator
Fix the optimization

It wasn't all that easy.
Fix a memory leak