Add initialize for new api support
apply second fix from #238, 1.1.12