Fixed potential memory leak (thx Jenkins)