Minor fixes and improvements for embedded mode