Fixed some problems in the instance tool