change init root to window
safer window context fix
Merge branch 'pr/97' into 0.7.0