fixed issues related to instances