fix instance undefined