fixes embedded mode.