small fix to init logic