Fix memory leak (Thanks Rudi)