Fix getting programme_id from ctx.