Added missing free
WIP on double pass for commandline