add #init to fix bug when path is changed