subfunctions: memory leak on latest test