Fixed memory leak + logging clear on #restart()