Add autoinit support and check if already inited

1.1 -> 1.2