bug fix to init