Handle initialization better

Particularly useful in multi-threaded env