bug fix for getinstance