Store command id locally so that it can be referenced in delegate callback