some api and embed fixes