Updated to attempt to free allocated memory from statgrab