Forgot to call freeMemory() function
Merge branch 'stage2'