Fixed memory leak introduced by 73458e8f