Fixed app_id memory leak;