Undid bad fix for mem leak