fixed issues with init/uninit