fix some embedded corner cases