Backport labs API fix from master