Fixed instance selection bug