Fix two embed bugs introduced by previous refactoring