use app.id instead of app_id for tasks. app_id could be null